// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(32,1) == 0;
	question = "special";
	text1 = "You begin to explore this network of natural caverns under the Okavano swamp. These must be sea caves. The echo of the surf to the north reaches you easily. The action of the sea burrowed out these tunnels over the last few millennia or so.";
	text2 = "The stone tiles and the Shaper door you just stepped through suggests that these caves have been settled for a long time. The stones are worn and covered with a thick accumulation of lichen and mold.";
	text3 = "The outpost down here is very old. And, based on the piles of bones you see by the east wall, you suspect that the current inhabitants are not friendly to visitors.";
	action = SET_SDF 32 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(32,2) == 0;
	question = "special";
	text1 = "You stand at the entrance to a large chamber. It contains a lot of Shaper equipment. None of it looks like it has been used in years. Some of it is still barely intact. The rest is dormant and covered with rust.";
	text2 = "You look around nervously, watching for the master of these caves. You do see a lone figure, standing in the middle of a magic circle to the north.";
	text3 = "It doesn't look at you. In fact, it acts a lot like the shades you have already encountered. And yet, you can sense the power radiating from it. It is like the shades, but it is far more dangerous.";
	action = SET_SDF 32 2 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(32,8) == 0;
	question = "special";
	text1 = "You get far enough into this chamber to see the creatures at the north end. There are three of them. Humanoid shapes. Translucent and glowing slightly. Each stands on a low Shaping platform. They are completely immobile.";
	text2 = "You look back at the open door you just passed through. This feels like an ambush, a sensation that has become all too familiar over the last few months.";
	text3 = "If you proceed and someone closes that door, you will be trapped.";
	action = SET_SDF 32 8 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";


begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You get close enough to get a good look at one of the shades. Their forms are barely visible in the dim light. They were human, once. Now most of the matter of their bodies is gone, replaced by a lattice of essence.";
	text2 = "They're not ghosts. They're pretty much dead. But the magic and art of the Shapers is keeping their bodies animated. Creating creatures like this is strictly forbidden by the Shaper Council. But none of them are around, so you're on your own.";
	text3 = "You've finally gotten close enough for the creatures to notice you. The simple instructions implanted in them by their creator take effect. The door to the north slides open. Without looking at you, the shades turn and walk toward it.";
	text4 = "From the door to the south, you hear an ominous click.";
	
begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You try to get the shade to respond to you. You shout. You wave at it. You throw a pebble through its insubstantial form. You don't get a response.";
	text2 = "It might be able to talk to you. If it is, it will do it in its own sweet time.";

begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You confront the shade at the center of the complex. It was a Shaper, once. Somehow, perhaps in an accident, it suffered the same fate as the specters you met outside. It is a construct now, more essence than flesh.";
	text2 = "And yet, a trace of his humanity remains. He still has a faint awareness, at the edge of perception, of what he was once. And it fills him with rage.";
	text3 = "When you get close, the nearly mindless creature decides to take that fury out on you.";

begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "As the spectral Shaper attacks you, some energy splits off from it. A pair of globes of energy float out of its chest. They form two more shades. A nearly invisible trail of light connects them. The shades draw power from their creator.";

begintalknode 14;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The Shaper shade has taken too much damage to hold itself together. It crumbles. Its servants dissolve with it. In moments, it is gone. The exorcism of these caves is complete.";

begintalknode 15;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "The three shades have gathered around a rune etched in the stone tiles. The rune is glowing slightly, though it is hard to tell through the mold and grime.";
	text2 = "When you get close to the shades, they finally react to your presence. One of them turns and looks at you and begins to speak. Its voice is weak and hollow. Its insubstantial form has a hard time gathering up enough air to form speech.";
	text3 = "It says, _Feeeed. Feeeeeeed. Feed the massster._";

begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "Feed the master?";
	text1 = "_Is tiiiiime. Call. Feeeed the massster!_";

begintalknode 32;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Still not getting you. You want me to feed the master?";
	text1 = "_Yessss ... You will feeeed ... feeeeeeee ..._ The shades turn and face the rune. They raise their arms in perfect unison.";
	text2 = "Glowing forms begin to appear on the symbol ...";
	action = END_TALK;

begintalknode 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "";
	text1 = "The shades have gathered again, surrounding yet another rune. When you get close, a different shade turns to face you.";
	text2 = "_It is tiiiiime ... tiiiiime ..._";

begintalknode 41;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "To feed the master, right?";
	text1 = "_Yesssss ... Feeeed ... Feed the masssster ..._";

begintalknode 42;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Fine. Let's get this over with.";
	text1 = "_Feeeed ... Feed the masssster ..._ As if it's not bad enough to be trapped down here with hostile shades and crazed creations. Is it too much to ask for a little decent conversation?";
	text2 = "Once again, the shades raise their arms in unison. More glowing shades appear on the platform.";
	action = END_TALK;
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = "Once again, you catch up to the shades, in their standard pattern around a glowing rune. You brace yourself for the arrival of another pack of rogues. It is not forthcoming.";
	text2 = "The shades have discharged most of their energy. They have started to waver slightly. Occasionally, bits of them flicker in and out of existence.";
	text3 = "The third shade, that has been silent until now, says, _Mussst protect ... fading ... mussst ... losing essssence ..._";

begintalknode 51;
	state = 50;
	nextstate = 51;
	condition = 1;
	question = "What is wrong?";
	text1 = "The shade looks at you. For the first time, you can see traces of actual intelligence. You are reminded that once, before its living tissue was replaced with magic and essence, this was a living, thinking person.";
	text2 = "As you watch, tiny traces of that intelligence manage to briefly come to the surface. The shade says, _Where ... what ... what happened? Where ... am ... No. Musssst serve massster. Must ... What am I?_";

	
begintalknode 52;
	state = 51;
	nextstate = -1;
	condition = get_stat(20) < 9;
	question = "You don't have to fight me. You can just leave.";
	text1 = "You use all of the force of your personality to communicate with the creature, to try to get it to comprehend its situation. You don't succeed. Its mind is too far gone.";
	text2 = "_Noooo ... Mussst ... Mussst feed the massster. No more summoning. Must fight. Fiiiiight ..._";
	text3 = "The three shades glide off of their platforms toward you. Oh, well. Worth a try.";
	action = END_TALK;
		
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = get_stat(20) >= 9;
	question = "You don't have to fight me. You can just leave.";
	text1 = "You use all of the force of your personality to communicate with the creature, to try to get it to comprehend its situation. Its mind is not yet too far gone. You succeed.";
	text2 = "_Whaaat ... Whaaaaaat ... What has Gyllaran done to usssss? We have been ... betrayed. Killed. Curse him. Cursssse him. He can feed himself._";
	text3 = "The shades start to fade away. As they do, they look at you and say, in unison, _Thank you ... Weeeee willllll ..._ And then they are gone.";
	text4 = "But not entirely. One of them leaves something behind. A gruesome bit of flesh, all that remained of its physical form. Seems interesting. You take it.";
	text5 = "You hear a click from the final door.";
	action = END_TALK;
	code =
		erase_char(8);
		erase_char(9);
		erase_char(10);
		sf(32,3,3);
		sf(32,9,3);
		sf(32,4,1);
		reward_give(331);
		award_party_xp(250,20);
	break;
		
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "What created you?";
	text1 = "_I ... I ... Nooooo ... Musssst ..._ The shade wavers back and forth, confused.";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "I'll be going now, if you don't mind. (Try to walk by.)";
	text1 = "Your movements disturb the creature. Its brief moment of self-awareness ends. _Nooooo ... Serve ... Musssst serve. Serve the master. Feed. Desssstroy. You musssst die._";
	text3 = "The three shades glide off of their platforms toward you.";
	action = END_TALK;
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "You are weak now, foul shade! I shall destroy you!";
	text1 = "When you lunge toward the shade, its physical form comes back into focus. Its brief moment of self-awareness ends. _Nooooo ... Serve ... Musssst serve. Serve the master. Feed. Desssstroy. You musssst die._";
	text3 = "The three shades glide off of their platforms toward you.";
	action = END_TALK;
	
begintalknode 60;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "The final shade has been destroyed. The final door lets out a soft clicking sound. Someone is releasing you from this trap.";
	text2 = "The servants are gone, but, somewhere, the master must remain. If you dare to face it.";


//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		